#include <stdio.h>
#include <stdlib.h>
#include "graph.h"
#include "solution.h"
#include "tabooState.h"
#include "parser-tools.h"
#include "graphbmp-tools.h"

int main(int argn, const char** args){
	FILE* graphFile;
	Pgraph pgraph;
	Psolution psolution;
	PtabooState ptaboostate;
	int N;
	int K;
	if (argn==3){
		graphFile = fopen(args[1],"r");
		K = atoi(args[2]);
	}else{
		printf("numero di parametri passati errati.\n");
		return EXIT_FAILURE;
	}
	pgraph=parseGraph(graphFile,&N);
	dijkstraFiller(pgraph);
	initSmartWeights(pgraph);
	psolution=initSolution(&K,&N);
	ptaboostate=initTabooState(&N,&K,0);

	buildSimpleConstructive(pgraph,psolution,ptaboostate);

	initSTMEngine(pgraph->T,pgraph->Q);
	executeSTM(psolution,pgraph,ptaboostate,10,5,true);

	printf("FINE.\n");

	return 0;
}
